{% extends "base.html" %}
{% load bootstrap_pagination %}

{% block content %}
    <ol class="breadcrumb">
        <li><a href="{% url 'translations:index' %}">首页</a></li>
        <li class="active">标签大全</li>
    </ol>

    <div class="row">
        {% for tag in tags %}
            {% if not forloop.first %}
                {% if forloop.counter0|divisibleby:"4" %}
                    <div class="col-md-12" style="margin-top: 15px;"></div>
                {% endif %}
            {% endif %}

            <div class="col-md-3">
                <a href="{% url 'translations:tag' tag.id %}" class="label label-info">{{ tag.name }} ({{ tag.num_articles }})</a>
            </div>
        {% endfor %}

        {% if tags.paginator.num_pages > 1 %}
            <hr>
            {% bootstrap_paginate tags range=10 %}
        {% endif %}
    </div>
{% endblock %}